package isdproject.server;

import java.util.ArrayList;
import java.util.List;

import isdproject.client.Klas;


import javax.jdo.PersistenceManager;

public class KlasDAOJdo implements KlasDAO {
	

	public void addKlas(Klas klas) 
	{
		PersistenceManager pm = PmfSingleton.get().getPersistenceManager();
		try 
		{
			pm.makePersistent(klas);
		} 
		finally 
		{
			pm.close();
		}
	}

	public List<Klas> listKlassen()
	{
		PersistenceManager pm = PmfSingleton.get().getPersistenceManager();
		String query = "select from " + Klas.class.getName();
		return (List<Klas>) pm.newQuery(query).execute();
	}
	
	

}
